package com.musemun.pojo;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.context.annotation.Bean;

import javax.validation.constraints.*;

/**
 * <p>
 *
 * </p>
 *
 * @author winner
 * @since 2020-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Crfixifo对象", description="")
@AllArgsConstructor
@NoArgsConstructor
public class Crfixifo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "文物编号")
    @Min(value = 0, message = "crNo不能为负数")
    @NotNull(message = "crNo不能为空")
    @TableField("crNo")
    public Long crNo;

    @ApiModelProperty(value = "修复方姓名")
    @TableField("FCName")
    @NotBlank(message = "姓名不能为空")
    @Size(min=1,max=15,message="姓名长度应在{min}-{max}")
    private String FCName;

    @ApiModelProperty(value = "修复起始时间")
    @TableField("FSDate")
    @NotNull(message = "FSDate不能为空")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date FSDate;

    @ApiModelProperty(value = "修复归还时间")
    @TableField("FEDate")
    @NotNull(message = "FEDate不能为空")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @Future(message = "归还时间必须大于当前时间")
    private Date FEDate;

    @ApiModelProperty(value = "备注")
    @TableField("FCRemark")
    private String FCRemark;


//    校验 yyyy-MM-dd HH:mm:ss
//    ^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\\s+([0-1]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$

}
